package pathAlgorithms;

import javax.vecmath.Point2d;

import program.Main;
import program.RoboMap;

public class WeightedAStar_DStarPath implements PathAlgorithm {
		
	@Override
	public Point2d[] getPath(RoboMap roboMap, Point2d current, Point2d goal, double currentTime) {
		RoboGraph graph = new WeightedRoboGraph(roboMap);
		Point2d[] path = graph.findPath(new RoboNode(new Point2d(Math.round(current.x),Math.round(current.y)), roboMap.getContentFromPosition(current)),
				              new RoboNode(goal, roboMap.getContentFromPosition(goal)));
		
		Main.graphLoggers.add(graph.getGraphLogger());
		return path;	
	}
}

